﻿
namespace DddCms.Domain.Utility
{
    /// <summary>
    /// Valide values with a list of rules.
    /// </summary>
    public interface IValidate
    {
        /// <summary>
        /// Valide if the specified object is valide for the rule set specidifed.
        /// </summary>
        /// <param name="value">The object</param>
        /// <param name="ruleSetName">The rule set name</param>
        /// <exception cref="ArgumentNullException">if the value is null</exception>
        /// <exception cref="ArgumentException">object is not valid</exception>
        void Valid<TValue>(TValue value, string ruleSetName);
        /// <summary>
        /// Valide if the specified value is null.
        /// </summary>
        /// <param name="value">The value.</param>
        /// <exception cref="ArgumentNullException">if the value is null</exception>
        void Null(object value);
    }
}
